<template>
	<view class='content' v-if="IsShow">
			<view class='item'>
				<view class='title'><view class="require">*</view>头像:</view>
				<view><image class='logo' :src='image'></image></view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>姓名:</view>
				<view>{{realname}}</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>登录状态:</view>
				<view>{{identity}}</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>性别:</view>
				<view class="uni-list-cell-db">
				   <view>{{gender}}</view>
				</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>联系电话:</view>
				<view @click="call"><uni-icon style="position:relative;top: 10upx;right: 20upx;" type="phone" size="22" color="#1AA034"></uni-icon> {{mobile}}</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>出生日期:</view>
				<view>{{birthday}}</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>居住地:</view>
				<view>{{address}}</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>工种:</view>
				<view class="uni-list-cell-db">
				   <view>{{work}}</view>
				</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>期望薪资(万韩元/天):</view>
				<view class="uni-list-cell-db">
				     <view>{{expect_pay}}</view>
				</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>工作描述:</view>
				<view class="uni-list-cell-db">
				     <view>{{workdesc}}</view>
				</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>健康状况:</view>
				<view class="uni-list-cell-db">
				   <view>{{health}}</view>
				</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>婚姻状况:</view>
				<view class="uni-list-cell-db">
				    <view>{{marital}}</view>
				</view>
			</view>
			<view class='item'>
				<view class='title'><view class="require">*</view>政治面貌:</view>
				<view class="uni-list-cell-db">
				   <view>{{politics}}</view>
				</view>
			</view>
	</view>
</template>
<script>
	import uniIcon from "@/components/uni-icon/uni-icon.vue";
	import api from '@/pages/utils/api.js';
	export default {
		components:{
			uniIcon
		},
		onLoad(e) {
			uni.showLoading({
			    title: '加载中'
			});
			this.getMember();
		},
		onShow() {
			if(uni.getStorageSync('checked_status') == 1){
				uni.navigateTo({
					url: '/pages/index/checked'
				});
				return;
			};
			this.IsShow = true
		},
		data(){
			return {
				IsShow:false,
				job_id:'',
				realname:'',
				image:'',
				gender:'',
				birthday:'',
				identity:'',
				address:'',
				mobile:'',
				politics:'',
				marital:'',
				health:'',
				expect_pay:'',
				work:'',
				workdesc:''
			}
		},
		methods:{
			getMember:function(){
				var vm = this;
				api.getMember({
					
				}).then(info=>{
					if(info.code == 1){ 
						uni.hideLoading();
						vm.IsShow = true;
						vm.realname = info.data.realname || '暂无';
						vm.image = info.data.image || '暂无';
						vm.gender = info.data.gender || '暂无';
						vm.identity = info.data.type==1?'企业':'工人';
						vm.birthday = info.data.birthday || '暂无';
						vm.address = info.data.address || '暂无';
						vm.mobile = info.data.mobile || '暂无';
						vm.politics = info.data.politics || '暂无';
						vm.marital = info.data.marital || '暂无';
						vm.health = info.data.health || '暂无';
						vm.expect_pay = info.data.expect_pay || '暂无';
						vm.work = info.data.profession.title || '暂无';
						vm.workdesc = info.data.work || '暂无';
					}
				})
			},
		}
	}
</script>
<style>
	.content{
		width: 100%;
		margin: 0 auto;
	}
	input{
		text-align: right;
	}
	.title{
		display: flex;
		align-items: center;
		color:#686868
	}
	.require{
		color:#ff0000;
		 padding-right: 20upx;
	}
	.item{
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom:2upx solid #EEE ;
		padding: 30upx;
	}
	.item .logo{
		width: 90upx;
		height: 90upx;
		border-radius: 50%;
	}
	.IsEmployment{
		display: flex;
		align-items: center;
		position: fixed;
		background: #D28300;
		bottom: 0;
		width: 100%;
		color:#FFF;
		box-shadow: #CCCCCC 2upx 2upx 2upx 2upx;
		padding: 20upx;
		text-align: center;
	}
</style>